<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/blog/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/blog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/blog/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/blog/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="Hexo, NexT" />










<meta name="description" content="最近开始写博客，先写一篇gitee+hexo+next+latex+vscode的环境搭建，当作是对markdown使用的熟悉。参考文章有如下几篇：  使用Gitee+Hexo搭建个人博客 Hexo+NexT（零）：最全Hexo+Next搭建博客教程 Hexo+Next 添加菜单分类页面 Hexo使用攻略-添加分类及标签 Hexo使用next主题也可以用latex啦 码农学数学最强攻略—-用vsc">
<meta property="og:type" content="article">
<meta property="og:title" content="Hexo环境搭建">
<meta property="og:url" content="http://zengzheming.gitee.io/2020/03/19/Hexo%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/index.html">
<meta property="og:site_name" content="曾哲明的博客">
<meta property="og:description" content="最近开始写博客，先写一篇gitee+hexo+next+latex+vscode的环境搭建，当作是对markdown使用的熟悉。参考文章有如下几篇：  使用Gitee+Hexo搭建个人博客 Hexo+NexT（零）：最全Hexo+Next搭建博客教程 Hexo+Next 添加菜单分类页面 Hexo使用攻略-添加分类及标签 Hexo使用next主题也可以用latex啦 码农学数学最强攻略—-用vsc">
<meta property="og:image" content="http://zengzheming.gitee.io/blog/2020/03/19/Hexo%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/0d1eb5f27bddc0aead0e8c8037bce394_webp.webp">
<meta property="og:image" content="http://zengzheming.gitee.io/blog/2020/03/19/Hexo%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/f0b63356c4074ac86adcefa884fa0250_webp.webp">
<meta property="og:image" content="http://zengzheming.gitee.io/blog/2020/03/19/Hexo%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/20200319142447.png">
<meta property="og:image" content="http://zengzheming.gitee.io/blog/2020/03/19/Hexo%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/20200319143100.png">
<meta property="article:published_time" content="2020-03-19T14:21:28.000Z">
<meta property="article:modified_time" content="2020-03-31T13:51:54.111Z">
<meta property="article:author" content="Zengzheming">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://zengzheming.gitee.io/blog/2020/03/19/Hexo%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/0d1eb5f27bddc0aead0e8c8037bce394_webp.webp">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Gemini',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://zengzheming.gitee.io/2020/03/19/Hexo环境搭建/"/>





  <title>Hexo环境搭建 | 曾哲明的博客</title>
  








<meta name="generator" content="Hexo 4.2.0"></head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/blog/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">曾哲明的博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">努力成为高级打杂</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/blog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/blog/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/blog/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/blog/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/blog/about" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://zengzheming.gitee.io/blog/2020/03/19/Hexo%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Zengzheming">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="曾哲明的博客">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Hexo环境搭建</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2020-03-19T22:21:28+08:00">
                2020-03-19
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/" itemprop="url" rel="index">
                    <span itemprop="name">环境搭建</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>最近开始写博客，先写一篇gitee+hexo+next+latex+vscode的环境搭建，当作是对markdown使用的熟悉。<br>参考文章有如下几篇：</p>
<ul>
<li><a href="https://www.jianshu.com/p/5014133ba61a" target="_blank" rel="noopener">使用Gitee+Hexo搭建个人博客</a></li>
<li><a href="https://blog.csdn.net/loze/article/details/94206726" target="_blank" rel="noopener">Hexo+NexT（零）：最全Hexo+Next搭建博客教程</a></li>
<li><a href="https://www.jianshu.com/p/3fe88ef479dd" target="_blank" rel="noopener">Hexo+Next 添加菜单分类页面</a></li>
<li><a href="https://www.jianshu.com/p/e17711e44e00" target="_blank" rel="noopener">Hexo使用攻略-添加分类及标签</a></li>
<li><a href="https://blog.csdn.net/qq_34229391/article/details/82725229" target="_blank" rel="noopener">Hexo使用next主题也可以用latex啦</a></li>
<li><a href="https://blog.csdn.net/qq_28566521/article/details/89358169" target="_blank" rel="noopener">码农学数学最强攻略—-用vscode+markdown+latex做出漂亮的数学笔记</a></li>
<li><a href="https://www.jianshu.com/p/ea78bdd0551f" target="_blank" rel="noopener">解决Hexo博客不显示图片的一种方法</a></li>
<li><a href="https://www.jianshu.com/p/393d067dba8d" target="_blank" rel="noopener">Hexo之next主题设置首页不显示全文(只显示预览)</a><h1 id="开始搭建"><a href="#开始搭建" class="headerlink" title="开始搭建"></a>开始搭建</h1></li>
</ul>
<h2 id="安装Hexo"><a href="#安装Hexo" class="headerlink" title="安装Hexo"></a>安装Hexo</h2><p>打开 shell 终端，输入命令</p>
<ul>
<li><code>sudo apt install npm</code></li>
<li><code>npm config set registry https://registry.npm.taobao.org</code></li>
<li><code>npm install -g cnpm --registry=https://registry.npm.taobao.org</code></li>
<li><code>npm install -g hexo</code>或者<code>sudo cnpm install -g hexo</code></li>
</ul>
<h2 id="初始化Hexo"><a href="#初始化Hexo" class="headerlink" title="初始化Hexo"></a>初始化Hexo</h2><p>在你的电脑上创建Hexo文件夹，在shell终端中切换到Hexo目录，输入命令 <code>hexo init</code></p>
<h2 id="获取NexT主题"><a href="#获取NexT主题" class="headerlink" title="获取NexT主题"></a>获取NexT主题</h2><p><code>git clone https://github.com/iissnan/hexo-theme-next themes/next</code> </p>
<h2 id="config-yml对博客进行基础配置"><a href="#config-yml对博客进行基础配置" class="headerlink" title="_config.yml对博客进行基础配置"></a>_config.yml对博客进行基础配置</h2><p>_config.yml文件修改，保存<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"># 原来的值是landscape</span><br><span class="line">theme: next</span><br></pre></td></tr></table></figure></p>
<h2 id="本地预览博客"><a href="#本地预览博客" class="headerlink" title="本地预览博客"></a>本地预览博客</h2><p>编译项目，输入命令：<code>hexo g</code><br>运行项目，输入命令：<code>hexo s</code><br>在浏览器中输入<code>http://localhost:4000/</code>就可以看到效果啦</p>
<h1 id="部署博客到Gitee上"><a href="#部署博客到Gitee上" class="headerlink" title="部署博客到Gitee上"></a>部署博客到Gitee上</h1><h2 id="创建Gitee账号和项目"><a href="#创建Gitee账号和项目" class="headerlink" title="创建Gitee账号和项目"></a>创建Gitee账号和项目</h2><h2 id="在-config-yml中配置Git"><a href="#在-config-yml中配置Git" class="headerlink" title="在_config.yml中配置Git"></a>在_config.yml中配置Git</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">deploy:</span><br><span class="line">    type: git</span><br><span class="line">    repo: https:&#x2F;&#x2F;gitee.com&#x2F;zengzheming&#x2F;blog.git</span><br><span class="line">    branch: master</span><br></pre></td></tr></table></figure>
<h2 id="发布到Gitee"><a href="#发布到Gitee" class="headerlink" title="发布到Gitee"></a>发布到Gitee</h2><p>输入命令<code>npm install hexo-deployer-git --save</code> 安装自动部署发布工具<br>输入命令<code>hexo clean &amp;&amp; hexo g &amp;&amp; hexo d</code> 发布博客，首次发布需要在shell中输入账号和密码。</p>
<h2 id="Gitee-Pages设置"><a href="#Gitee-Pages设置" class="headerlink" title="Gitee Pages设置"></a>Gitee Pages设置</h2><p><img src="/blog/2020/03/19/Hexo%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/0d1eb5f27bddc0aead0e8c8037bce394_webp.webp" alt="avatar"><br>选择 master分支，点击 部署/更新<br><img src="/blog/2020/03/19/Hexo%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/f0b63356c4074ac86adcefa884fa0250_webp.webp" alt="avatar"></p>
<p>稍等一会儿博客就发布成功啦，访问博客地址：<code>https://zengzheming.gitee.io/blog</code>，就可预览在线博客啦！！！<br>如果博客的样式不对，则需要在_config.yml中配置下博客地址和路径：</p>
<pre><code>url: https://xiuxiuing.gitee.io/
root: /blog
</code></pre><p>再执行命令<code>hexo clean &amp;&amp; hexo g &amp;&amp; hexo d</code> 就可以啦。</p>
<h1 id="Hexo-Next-添加菜单分类页面"><a href="#Hexo-Next-添加菜单分类页面" class="headerlink" title="Hexo+Next 添加菜单分类页面"></a>Hexo+Next 添加菜单分类页面</h1><p>在[Hexo+Next]主题下新增一个关于分类页面。</p>
<h2 id="新建一个页面，命名为about。"><a href="#新建一个页面，命名为about。" class="headerlink" title="新建一个页面，命名为about。"></a>新建一个页面，命名为about。</h2><p><code>hexo new page &quot;about&quot;</code><br>此时会在<code>hexo &gt; source</code>文件夹中会生成一个<code>about</code>文件夹。</p>
<h2 id="编辑about文件夹下的md页面"><a href="#编辑about文件夹下的md页面" class="headerlink" title="编辑about文件夹下的md页面"></a>编辑about文件夹下的md页面</h2><p>将类型设置为<code>about</code>，主题将自动为这个页面显示所有分类。<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">title: 常用工具</span><br><span class="line">date: 2017-12-14 13:05:38</span><br><span class="line">type: &quot;about&quot;</span><br><span class="line">---</span><br></pre></td></tr></table></figure></p>
<h2 id="在菜单中添加链接"><a href="#在菜单中添加链接" class="headerlink" title="在菜单中添加链接"></a>在菜单中添加链接</h2><p>编辑主题的_config.yml，在menu中的添加如下:<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">menu:</span><br><span class="line">    about: &#x2F;about||download</span><br></pre></td></tr></table></figure><br>||之前的值是目标链接，之后的是分类页面的图标，图标名称来自于<a href="https://fontawesome.com/icons" target="_blank" rel="noopener">FontAwesome icon</a>。若没有配置图标，默认会使用问号图标。</p>
<h2 id="新添加的菜单需要翻译对应的中文"><a href="#新添加的菜单需要翻译对应的中文" class="headerlink" title="新添加的菜单需要翻译对应的中文"></a>新添加的菜单需要翻译对应的中文</h2><p>打开<code>hexo&gt;theme&gt;next&gt;languages&gt;zh-Hans.yml</code>，在menu下添加：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">menu:</span><br><span class="line">  home: 首页</span><br><span class="line">  archives: 归档</span><br><span class="line">  categories: 分类</span><br><span class="line">  tags: 标签</span><br><span class="line">  about: 关于</span><br><span class="line">  search: 搜索</span><br><span class="line">  schedule: 日程表</span><br><span class="line">  sitemap: 站点地图</span><br><span class="line">  commonweal: 公益404</span><br><span class="line">  resources: 资源</span><br></pre></td></tr></table></figure></p>
<h1 id="Hexo-Next更换主题"><a href="#Hexo-Next更换主题" class="headerlink" title="Hexo+Next更换主题"></a>Hexo+Next更换主题</h1><p>修改themes下next的_config.yml(默认是scheme: Muse)<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"># Schemes</span><br><span class="line"># scheme: Muse</span><br><span class="line"># scheme: Mist</span><br><span class="line"># scheme: Pisces</span><br><span class="line">scheme: Gemini</span><br></pre></td></tr></table></figure></p>
<h1 id="Hexo显示图片资源"><a href="#Hexo显示图片资源" class="headerlink" title="Hexo显示图片资源"></a>Hexo显示图片资源</h1><h2 id="修改博客配置"><a href="#修改博客配置" class="headerlink" title="修改博客配置"></a>修改博客配置</h2><p>修改博客根目录中<code>_config.yml</code>文件的配置项<code>post_asset_folder</code>为<code>true：</code><br><code>post_asset_folder: true</code><br>完成此设置后，当你通过<code>hexo new 文件名</code>新建博客后，会产生一个和文件同名的文件夹。<br>当文章需要添加图片时，将需要添加的图片放入同名的文件夹中，同时通过相对路径索引到该图片。</p>
<h1 id="Hexo的Next设置首页不显示全文"><a href="#Hexo的Next设置首页不显示全文" class="headerlink" title="Hexo的Next设置首页不显示全文"></a>Hexo的Next设置首页不显示全文</h1><ul>
<li>进入hexo博客项目的themes/next目录</li>
<li>用文本编辑器打开_config.yml文件</li>
<li>搜索”auto_excerpt”,找到如下部分：<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"># Automatically Excerpt. Not recommand.</span><br><span class="line"># Please use &lt;!-- more --&gt; in the post to control excerpt accurately.</span><br><span class="line">auto_excerpt:</span><br><span class="line">  enable: false</span><br><span class="line">  length: 150</span><br></pre></td></tr></table></figure>
</li>
</ul>
<h1 id="Hexo-Next使用latex"><a href="#Hexo-Next使用latex" class="headerlink" title="Hexo+Next使用latex"></a>Hexo+Next使用latex</h1><ul>
<li>更换Hexo的默认的hexo-renderer-marked渲染引擎，改为hexo-renderer-kramed。在终端输入命令如下：<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo npm uninstall hexo-renderer-marked</span><br><span class="line">sudo npm install hexo-renderer-kramed --save</span><br></pre></td></tr></table></figure></li>
<li>开启NexT主题的Mathjax的开关，找到下图所示的内容，将false改为true。</li>
<li>解决语义冲突，在Hexo的目录下找到node_modules\kramed\lib\rules\inline.js</li>
<li>在写博客的时候，如果在博客里面用到了latex公式，那么就在文件头加上：<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">mathjax: true</span><br></pre></td></tr></table></figure>
这样子就可以使用latex编辑公式啦。</li>
</ul>
<h1 id="Hexo使用vscode-markdown-latex-Mathpix-写文章"><a href="#Hexo使用vscode-markdown-latex-Mathpix-写文章" class="headerlink" title="Hexo使用vscode+markdown+latex+Mathpix 写文章"></a>Hexo使用vscode+markdown+latex+Mathpix 写文章</h1><ul>
<li>在vscode中安装插件Markdown Allzhanting in One和Markdown Preview Enhanced，千万不要安装markdownlint，之前搞错了，在预览窗口死活不正确显示公式</li>
<li>使用公式截图神器Mathpix获得latex<br><img src="/blog/2020/03/19/Hexo%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/20200319142447.png" alt="avatar"></li>
<li>粘贴Mathpix的结果$$$L<em>{i}^{\text {det}}=-\left(y</em>{i}^{\text {det}} \log \left(p<em>{i}\right)+\left(1-y</em>{i}^{\text {det}}\right)\left(1-\log \left(p_{i}\right)\right)\right)$$$复制到vscode的markdown文件中</li>
<li>vscode中使用markdown preview enhanced预览如下：<br><img src="/blog/2020/03/19/Hexo%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/20200319143100.png" alt="avatar"></li>
</ul>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/blog/2020/03/19/v2ray%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/" rel="prev" title="v2ray环境搭建">
                v2ray环境搭建 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name">Zengzheming</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/blog/archives/%7C%7Carchive">
              
                  <span class="site-state-item-count">10</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/blog/categories/index.html">
                  <span class="site-state-item-count">7</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/blog/tags/index.html">
                  <span class="site-state-item-count">5</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#开始搭建"><span class="nav-number">1.</span> <span class="nav-text">开始搭建</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#安装Hexo"><span class="nav-number">1.1.</span> <span class="nav-text">安装Hexo</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#初始化Hexo"><span class="nav-number">1.2.</span> <span class="nav-text">初始化Hexo</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#获取NexT主题"><span class="nav-number">1.3.</span> <span class="nav-text">获取NexT主题</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#config-yml对博客进行基础配置"><span class="nav-number">1.4.</span> <span class="nav-text">_config.yml对博客进行基础配置</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#本地预览博客"><span class="nav-number">1.5.</span> <span class="nav-text">本地预览博客</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#部署博客到Gitee上"><span class="nav-number">2.</span> <span class="nav-text">部署博客到Gitee上</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#创建Gitee账号和项目"><span class="nav-number">2.1.</span> <span class="nav-text">创建Gitee账号和项目</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#在-config-yml中配置Git"><span class="nav-number">2.2.</span> <span class="nav-text">在_config.yml中配置Git</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#发布到Gitee"><span class="nav-number">2.3.</span> <span class="nav-text">发布到Gitee</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Gitee-Pages设置"><span class="nav-number">2.4.</span> <span class="nav-text">Gitee Pages设置</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Hexo-Next-添加菜单分类页面"><span class="nav-number">3.</span> <span class="nav-text">Hexo+Next 添加菜单分类页面</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#新建一个页面，命名为about。"><span class="nav-number">3.1.</span> <span class="nav-text">新建一个页面，命名为about。</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#编辑about文件夹下的md页面"><span class="nav-number">3.2.</span> <span class="nav-text">编辑about文件夹下的md页面</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#在菜单中添加链接"><span class="nav-number">3.3.</span> <span class="nav-text">在菜单中添加链接</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#新添加的菜单需要翻译对应的中文"><span class="nav-number">3.4.</span> <span class="nav-text">新添加的菜单需要翻译对应的中文</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Hexo-Next更换主题"><span class="nav-number">4.</span> <span class="nav-text">Hexo+Next更换主题</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Hexo显示图片资源"><span class="nav-number">5.</span> <span class="nav-text">Hexo显示图片资源</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#修改博客配置"><span class="nav-number">5.1.</span> <span class="nav-text">修改博客配置</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Hexo的Next设置首页不显示全文"><span class="nav-number">6.</span> <span class="nav-text">Hexo的Next设置首页不显示全文</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Hexo-Next使用latex"><span class="nav-number">7.</span> <span class="nav-text">Hexo+Next使用latex</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Hexo使用vscode-markdown-latex-Mathpix-写文章"><span class="nav-number">8.</span> <span class="nav-text">Hexo使用vscode+markdown+latex+Mathpix 写文章</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Zengzheming</span>

  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Gemini</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/blog/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/blog/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/blog/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/blog/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/blog/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/blog/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  
  
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        tex2jax: {
          inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
          processEscapes: true,
          skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
        }
      });
    </script>

    <script type="text/x-mathjax-config">
      MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for (i=0; i < all.length; i += 1) {
          all[i].SourceElement().parentNode.className += ' has-jax';
        }
      });
    </script>
    <script type="text/javascript" src="//cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
  


  

  

</body>
</html>
